# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-hcloud
pkgver=2.3.0
pkgrel=0
pkgdesc="Official Hetzner Cloud Python library"
url="https://github.com/hetznercloud/hcloud-python"
license="MIT"
arch="noarch"
depends="py3-dateutil py3-requests"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/hetznercloud/hcloud-python/archive/v$pkgver/py3-hcloud-$pkgver.tar.gz"
builddir="$srcdir/hcloud-python-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/hcloud-$pkgver-py3-none-any.whl
}

sha512sums="
8591b5406d51c8f71fdcb16bb423cc2317310484d3ef6a784d63fdb2dca9ec10d33a9fd6347f3c37e7a7c4772869a15013f8c6a83b5a2b867da0c41184c88d45  py3-hcloud-2.3.0.tar.gz
"
